<ResourceDictionary
    
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:awc="clr-namespace:Assergs.Windows.Controls"
    xmlns:aw="clr-namespace:Assergs.Windows"
	>
    
    <SolidColorBrush x:Key="NormalBorderBrush" Color="{x:Static aw:TextBoxPallet.NormalBorderBrush}"></SolidColorBrush>
    <SolidColorBrush x:Key="ControlsBackGroundBrush" Color="{x:Static aw:TextBoxPallet.ControlsBackGroundBrush}"/>
    <SolidColorBrush x:Key="DisabledBorderBrush" Color="{x:Static aw:TextBoxPallet.DisabledBorderBrush}"/>
    <SolidColorBrush x:Key="DisabledForegroundBrush" Color="{x:Static aw:TextBoxPallet.DisabledForegroundBrush}"/>

	<Style x:Key="{x:Type TextBox}" TargetType="{x:Type TextBoxBase}">
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="OverridesDefaultStyle" Value="True"/>
        <Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Background" Value="{StaticResource ControlsBackGroundBrush}" />
        <Setter Property="BorderBrush" Value="{StaticResource NormalBorderBrush}" />
        <Setter Property="FontSize" Value="12"/>
        <Setter Property="AllowDrop" Value="true"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TextBoxBase}">
                    <Border
                      Name="Border"
                      CornerRadius="2"
                      Padding="2"
                      Background="{TemplateBinding Background}"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      BorderThickness="1" >
                        <ScrollViewer Margin="0" x:Name="PART_ContentHost"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <!--<Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource DisabledBorderBrush}"/>-->
                            <Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- SimpleStyles: RichTextBox -->

    <Style x:Key="{x:Type RichTextBox}"
         BasedOn="{StaticResource {x:Type TextBox}}"
         TargetType="{x:Type RichTextBox}">
        <Style.Resources>
            <Style x:Key="{x:Type FlowDocument}"
                 TargetType="{x:Type FlowDocument}">
                <Setter Property="OverridesDefaultStyle"
                    Value="true"/>
            </Style>
        </Style.Resources>
    </Style>

    <!-- SimpleStyles: PasswordBox -->

    <Style x:Key="{x:Type PasswordBox}" TargetType="{x:Type PasswordBox}">
        <Setter Property="SnapsToDevicePixels" Value="true"/>
        <Setter Property="OverridesDefaultStyle" Value="true"/>
        <Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="FontFamily" Value="Verdana"/>
        <Setter Property="PasswordChar" Value="●"/>
        <!--<Setter Property="MinWidth" Value="120"/>-->
        <!--<Setter Property="MinHeight" Value="20"/>-->
        <Setter Property="AllowDrop" Value="true"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type PasswordBox}">
                    <Border
                      Name="Border"
                      CornerRadius="2"
                      Padding="2"
                      Background="{DynamicResource ControlsBackGroundBrush}"
                      BorderBrush="{DynamicResource NormalBorderBrush}"
                      BorderThickness="1" >
                        <ScrollViewer x:Name="PART_ContentHost" />
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource DisabledBorderBrush}"/>
                            <Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
    <Style x:Key="{x:Type awc:MaskTextBox}" BasedOn="{StaticResource {x:Type TextBox}}" TargetType="{x:Type awc:MaskTextBox}" />

</ResourceDictionary>